#ifndef __CPPTUTORSTACKUSINGLINKEDLIST_H__
#define __CPPTUTORSTACKUSINGLINKEDLIST_H__

#include <string>

using namespace std;

class Stack
{
    private:
        struct item
        {
            string name;
            int value;
            item* prev; // node pointer poiting to the previous node or the below node of it
        };
        item* stackPtr;

    public:
        Stack ();
       ~Stack ();

        void Push (string name, int value); // create new item and store name and value and place item on top of stack
        void Pop (); // take an item off the stack and and make that stack pointer is pointer ot the new top
        void ReadItem (item* r);   // display the content of some item. it take a item pointer and display the result
        void Print ();  // prints the content of the stack

};

#endif